<?php
class cls_serve_product extends cls_serve_base
{
	function get_product_list($page,$rp,$where,$sort)
	{
		$product_data = parent::get_data();
		$product_list = $product_data->get_product_list($page,$rp,$where,$sort);
		return $product_list;

	}

    function modify_quantity ($items)
    {
    	$product_data = parent::get_data();
    	$product_data->modify_quantity($items);
    	
    }

    function add_product($name,$publisher,$description,$author,$prolang,$quantity,$price,$category,$path,$totalpage,$isbn)
    {
    	$product_data = parent::get_data();
    	$product_data->add_product($name,$isbn,$description,$author,$prolang,$quantity,$price,$category,$path,$totalpage,$publisher);
    }

	function delete_product($items)
	{
		$product_data = parent::get_data();
		$product_data->delete_product($items);
	}
	
	function getCount($where)
	{
		$product_data = parent::get_data();
		$count = $product_data->countRec('a.id',$where);
		return $count;
	}

}